Conventionally, a terminal, such as a mobile phone, may have a touch display screen. The touch display screen can be used to display a user interface and can also be used to receive a touch operation of a user.
In order to reduce the possibility that the touch display screen is inadvertently touched, a method for preventing a terminal from being inadvertently touched is provided in the related art. A distance sensor is provided on a front panel of a terminal and detects a distance between an external object and the front panel of the terminal. The display screen of the terminal is set to an off-screen state when the distance is less than a predetermined threshold.